package com.cloudcc.cloudframe.ui.viewgroup.loadmore;

import android.view.View;
import android.widget.AbsListView;

/**
 * @Description: 加载更多
 * @author wangzhiqiang
 * @date 2015-12-14 下午2:02:40
 * 
 */
public interface LoadMoreContainer {

	public void setShowLoadingForFirstPage(boolean showLoading);

	public void setAutoLoadMore(boolean autoLoadMore);

	public void setOnScrollListener(AbsListView.OnScrollListener l);

	public void setLoadMoreView(View view);

	public void setLoadMoreUIHandler(LoadMoreUIHandler handler);

	public void setLoadMoreHandler(LoadMoreHandler handler);

	/**
	 * When data has loaded
	 * 
	 * @param emptyResult
	 *            数据是否 为空 空:true
	 * @param hasMore
	 *            是否还有更多呢? 还有更多 true
	 */
	public void loadMoreFinish(boolean emptyResult, boolean hasMore);

	/**
	 * When something unexpected happened while loading the data
	 * 
	 * @param errorCode
	 * @param errorMessage
	 */
	public void loadMoreError(int errorCode, String errorMessage);
}
